home *** CD-ROM | disk | FTP | other *** search
- property sd, spriteNum
-
- on beginSprite me
- sd = sprite(spriteNum)
- sd.blend = 0
- end
-
- on mouseEnter me
- sd.blend = 100
- end
-
- on mouseLeave me
- sd.blend = 0
- end
-
- on mouseUp me
- global gName
- thename = sendSprite(348, #GetText)
- playSound(9, "mousedown1")
- if FreeName(me, thename) then
- sendSprite(346, #closeUp)
- sprite(349).visible = 0
- if thename = EMPTY then
- thename = "player"
- end if
- gName = thename
- setPref("LastProfile", gName)
- NewProfile(gName)
- if gName = "SHAZaaM" then
- CompleteProfile()
- end if
- else
- sendSprite(372, #show)
- end if
- end
-
- on FreeName me, nam
- global gProfiles
- nottaken = 1
- upName = makeUpperCase(me, nam)
- put "upName", upName, nam
- c = gProfiles.count
- repeat with b = 1 to c
- up = makeUpperCase(me, gProfiles[b])
- put "comparing to", up
- if up = upName then
- nottaken = 0
- end if
- end repeat
- return nottaken
- end
-
- on makeUpperCase me, upString
- repeat with x = 1 to length(upString)
- thisChar = charToNum(char x of upString)
- if (thisChar >= 97) and (thisChar <= 122) then
- put numToChar(thisChar - 32) into char x of upString
- end if
- end repeat
- return upString
- end
-